import request from '@/utils/request'

// 创建质检单信息
export function createQcOrder(data) {
  return request({
    url: '/hs/qc-order/create',
    method: 'post',
    data: data
  })
}

export function defectHandle(data) {
  return request({
    url: '/hs/qc-order/defect-handle',
    method: 'post',
    data: data
  })
}

// 更新质检单信息
export function updateQcOrder(data) {
  return request({
    url: '/hs/qc-order/update',
    method: 'put',
    data: data
  })
}

// 删除质检单信息
export function deleteQcOrder(id) {
  return request({
    url: '/hs/qc-order/delete?id=' + id,
    method: 'delete'
  })
}

// 获得质检单信息
export function getQcOrder(id) {
  return request({
    url: '/hs/qc-order/get?id=' + id,
    method: 'get'
  })
}

// 获得质检单信息分页
export function getQcOrderPage(params) {
  return request({
    url: '/hs/qc-order/page',
    method: 'get',
    params
  })
}
// 导出质检单信息 Excel
export function exportQcOrderExcel(params) {
  return request({
    url: '/hs/qc-order/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
